package cn.rengy.web.framework.wxmp.pub.project;

import java.util.concurrent.Callable;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;


import cn.rengy.web.framework.cache.CacheService;
import cn.rengy.web.framework.sql.DbService;

@Service
public class SysCenterProjectService {

	@Autowired
	private DbService dbService;
	
	@Autowired
	private CacheService cacheService;
	
	//private RedisTemplate<Object, Object> redisTemplate;
	
	public SysCenterProjectPO getProject(Long projectId){
		
		return cacheService.getLocalCacheIncludeNull("sysCenterProjectCache", projectId.toString(), new Callable<SysCenterProjectPO>() {
	        @Override
	        public SysCenterProjectPO call() throws Exception {
	        	return dbService.queryForBean("select_get_dcs_center_project",SysCenterProjectPO.class, projectId);
	        }
	    });
		
	}
	
}
